
package ch.hearc.java.jmapviewer.example;

import java.awt.BorderLayout;

import javax.swing.JFrame;

/***
 * Mainframe
 * @author Adrian Moll
 *
 */
public class JFrameMapViewer extends JFrame
	{

	/*------------------------------------------------------------------*\
	|*							Constructeurs							*|
	\*------------------------------------------------------------------*/

	JFrameMapViewer()
		{
		geometry();
		control();
		apparence();
		}

	/*------------------------------------------------------------------*\
	|*							Methodes Public							*|
	\*------------------------------------------------------------------*/

	/*------------------------------------------------------------------*\
	|*							Methodes Private						*|
	\*------------------------------------------------------------------*/
	private void geometry()
		{
		this.setLayout(new BorderLayout());
		panelMap = new JPanelMap();
		mapMarker = new JPanelMapMarker(47.56, 7.5813);
		panelMap.addMarker(mapMarker);

		this.add(panelMap, BorderLayout.CENTER);
		}

	private void control()
		{
		this.setDefaultCloseOperation(EXIT_ON_CLOSE);
		}

	private void apparence()
		{
		this.setTitle("JMapViewer Example");
		this.setSize(800, 600);
		this.setVisible(true);

		}

	/*------------------------------------------------------------------*\
	|*							Attributs Private						*|
	\*------------------------------------------------------------------*/

	//Tools
	private JPanelMap panelMap;
	private JPanelMapMarker mapMarker;
	}
